<%@page import="RssEasy.DAL.Pagination"%>
<%@page import="Servlet.purchase.list"%>
<%@page import="Model.Purchase.PurchaseMaterielOfferView"%>
<%@page import="Model.Purchase.PurchaseOfferList"%>
<%@page import="Model.Purchase.PurchaseListView"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page import="Model.My.PurchaseResultListView"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    PurchaseResultListView prlv = new PurchaseResultListView(pageContext);
    CookieHelper cookie = new CookieHelper(request, response);
    PurchaseListView plv = new PurchaseListView(pageContext);
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>企企通-询价比管理</title>
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="/my/css/enquiry.css" rel="stylesheet" type="text/css" />
        <link href="/purchase/css/alert.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <h1>询价比管理</h1>
        <ul id="tag">
            <li class="selected">参与项目</li>
            <li>我的项目</li>
        </ul>
        <ol id="content">
            <li class="selected" id='content1'>
                <div class="option">
                    <p id="choose3">项目类别：<span id="choose1" class="selected" value="6">材料</span><span value="7">设备</span><span value="8">劳务</span></p>
                    发布日期：<input type="text" id="start" class="Wdate" onFocus="WdatePicker({lang: 'zh-cn', dateFmt: 'yyyy-MM-dd'})" name='enddt' readonly placeholder="请选择开始日期">
                    到<input type="text" id="end" class="Wdate" onFocus="WdatePicker({lang: 'zh-cn', dateFmt: 'yyyy-MM-dd'})" name='enddt' readonly placeholder="请选择截止日期"><button type="button" id='butn1'>查询</button>
                </div>
                <table>
                    <tr>
                        <td>项目名称</td>
                        <td>发布时间</td>
                        <td>截止时间</td>
                        <td>中标结果</td>
                    </tr>
                    <%
                        prlv.pagesize = 100000;
                        String level = cookie.Get("level");
                        String myid;
                        if(level.equals("0")){
                            myid =cookie.Get("myid");
                        }else{
                            myid =cookie.Get("level"); 
                        }
                        prlv.select().where("myid=? and typid=1",myid).get_page_desc("id");
                        while (prlv.for_in_rows()) {
                    %>
                    <tr class="content1">
                        <td><a href="participate.jsp?purchaseid=<%prlv.write("purchaseid");%>"><%prlv.write("name");%></a></td>
                        <td class='shijian' rssdate="<%prlv.write("shijian");%>,yyyy-MM-dd"></td>
                        <td rssdate="<%prlv.write("enddt");%>,yyyy-MM-dd"></td>
                        <td class="if" offerresult='<%prlv.write("result");%>' purchase_class="<%=prlv.get("purchase_class")%>"></td>
                    </tr>
                    <% }%>
                </table>
            </li>
            <li id='content2'>
                <div class="option">
                    <p id="choose4">定标结果：<span class="selected" id='deside'>已定标</span><span id='notdeside'>未定标</span></p>
                    <p id="choose2">项目类别：<span class="selected" value="6">材料</span><span value="7">设备</span><span value="8">劳务</span></p>
                    发布日期：<input type="text" id="start2" class="Wdate" onFocus="WdatePicker({lang: 'zh-cn', dateFmt: 'yyyy-MM-dd'})" name='enddt' readonly placeholder="请选择开始日期">
                    到<input type="text" id="end2" class="Wdate" onFocus="WdatePicker({lang: 'zh-cn', dateFmt: 'yyyy-MM-dd'})" name='enddt' readonly placeholder="请选择截止日期"><button id='butn2'>查询</button>
                </div>
                <table>
                    <tr>
                        <td>项目名称</td>
                        <td>发布时间</td>
                        <td>截止时间</td>
                        <td>定标结果</td>
                    </tr>
                    <%
                        plv.pagesize = 100000;
                        plv.select().where("myid=? and typid=1", myid).get_page_desc("id");
                        while (plv.for_in_rows()) {
                    %>
                    <tr class="content1">
                        <td><a href="my_project.jsp?purchaseid=<%plv.write("id");%>&part=<%plv.write("state");%>&value=1"><%plv.write("name");%></a></td>
                        <td class="shijian" rssdate="<%plv.write("shijian");%>,yyyy-MM-dd"></td>
                        <td rssdate="<%plv.write("enddt");%>,yyyy-MM-dd"></td>
                        <td class="if" purchasestate="<%plv.write("state");%>" purchase_class="<%=plv.get("purchase_class")%>"></td>
                    </tr>
                    <% }%>
                </table>
            </li>
        </ol>
        <!--分页--> 
        <div id="page">
            <a href="javascript:first()">首页</a>
            <a href="javascript:previous()">上一页</a>
            <a><b></b></a>
            <a href="javascript:next()">下一页</a>
            <a href="javascript:last()">尾页</a>
            <a>跳转</a>
            <input type="text" name=""/>
            <a href="javascript:goTo()">确定</a>
        </div>
        <%@include file="/inc/js_all.html" %>
        <script src="/purchase/js/alert.js" type="text/javascript"></script>
        <script src="/js/placeholderfriend.js" type="text/javascript"></script>
        <script src="/purchase/js/dictdata.js" type="text/javascript"></script>
        <script src="/my/js/pagination.js" type="text/javascript"></script>
        <script type="text/javascript" src="/my/js/enquiry.js"></script>
        <script src="/wdatepicker/WdatePicker.js" type="text/javascript"></script>
    </body>
</html>
